#include "platform.h"
#include "SoftI2C.h"

I2C_t i2c0;

void main()
{
    *I2C_BASEADDR = 0 ; // 仿真时需要
    SoftI2C_Init(&i2c0 ,I2C_BASEADDR, I2C0_PIN_SCL ,I2C0_PIN_SDA , 0) ;
	while(1){
        SoftI2C_Start(&i2c0);
        SoftI2C_SendByte(&i2c0,0x32); // 器件地址
        SoftI2C_ReceiveAck(&i2c0);	
        SoftI2C_SendByte(&i2c0,0x66); // 发送的数据
        SoftI2C_ReceiveAck(&i2c0);	
        SoftI2C_Stop(&i2c0);
        break ;
	}

    while (1);
    
	return ;
}


